package com.company.cloud.art.modules.app.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.company.cloud.art.modules.api.request.ArtActQueryReq;
import com.company.cloud.art.modules.api.response.ArtAct;
import com.company.cloud.art.modules.api.response.ArtActQueryResp;
import com.company.cloud.art.modules.base.entity.ActivityInfo;
import com.company.cloud.art.modules.mgr.service.ActActivityMgrService;
import com.company.cloud.common.bean.BaseResult;
import com.company.cloud.common.exception.BusinessException;
import com.company.cloud.common.log.annotation.SysLog;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/app/art/activity")
@Api(tags="ART_活动")
public class ArtActivityController {


    @Autowired
    private ActActivityMgrService actActivityMgrService;


    @PostMapping("/query")
    @ApiOperation(value="活动列表", response= ArtAct.class)
    public BaseResult query(@RequestBody ArtActQueryReq params) {
        ArtActQueryResp data= actActivityMgrService.actQuery(params);
        return BaseResult.ok(data);
    }


    @GetMapping("/get")
    @ApiOperation(value="活动详情",response = ArtAct.class)
    public BaseResult get(@RequestParam("activityNo")String activityNo) {
        ArtAct data= actActivityMgrService.actInfo(activityNo);
        return BaseResult.ok(data);
    }

}
